import Vue from 'vue';
import Router from 'vue-router';
const register = resolve => require(['@/page/common/register'], resolve) 
const loginPage = resolve => require(['@/page/common/login-page'], resolve) 
const rechargePassword = resolve => require(['@/page/common/recharge-password'], resolve)

//医院
const doctorList = resolve => require(['@/page/doctorList/doctorList'], resolve)
const doctorDetail = resolve => require(['@/page/doctorList/doctorDetail'], resolve)
const doctorInquiry = resolve => require(['@/page/doctorList/doctorInquiry'], resolve)

const checkList = resolve => require(['@/page/checkList/checkList'], resolve)
const patientList = resolve => require(['@/page/patientList/patientList'], resolve)
const caseEdit = resolve => require(['@/page/patientList/caseEdit'], resolve)
const caseAdd = resolve => require(['@/page/patientList/caseAdd'], resolve)
const inquiryAdd = resolve => require(['@/page/patientList/inquiryAdd'], resolve)
const inquiryEdit = resolve => require(['@/page/patientList/inquiryEdit'], resolve)
const followAdd = resolve => require(['@/page/patientList/followAdd'], resolve)
const followEdit = resolve => require(['@/page/patientList/followEdit'], resolve)
const medicineAdd = resolve => require(['@/page/patientList/medicineAdd'], resolve)
const medicineEdit = resolve => require(['@/page/patientList/medicineEdit'], resolve)

const activityList = resolve => require(['@/page/activityList/activityList'], resolve)
const activityEdit = resolve => require(['@/page/activityList/activityEdit'], resolve)

const adviceList = resolve => require(['@/page/advice/adviceList'], resolve)
const bannerList = resolve => require(['@/page/banner/bannerList'], resolve)
const checkDetail = resolve => require(['@/page/checkList/checkDetail'], resolve)
const adviceDetail = resolve => require(['@/page/advice/adviceDetail'], resolve)


Vue.use(Router)

export default new Router({
  mode: 'history',
  base:'/sys/', 
  routes: [
      {
          path: '/loginPage',
          name: 'loginPage',
          component: loginPage
      },
      {
        path: '/register',
        name: 'register',
        component: register
      },
      {
        path: '/rechargePassword',
        name: 'rechargePassword',
        component: rechargePassword
      },
      {
          path: '/',
          name: 'doctorList',
          component: doctorList
      },
      {
          path: '/doctor/detail',
          name: 'doctorDetail',
          component: doctorDetail
      },
      {
          path: '/doctor/inquiry',
          name: 'doctorInquiry',
          component: doctorInquiry
      },
      {
          path: '/check/list',
          name: 'checkList',
          component: checkList
      },
      {
          path: '/patient/list',
          name: 'patientList',
          component: patientList
      },
      {
          path: '/patient/case/edit',
          name: 'caseEdit',
          component: caseEdit
      },
      {
          path: '/patient/case/add',
          name: 'caseAdd',
          component: caseAdd
      },
      {
          path: '/patient/follow/edit',
          name: 'followEdit',
          component: followEdit
      },
      {
          path: '/patient/follow/add',
          name: 'followAdd',
          component: followAdd
      },
      {
          path: '/patient/inquiry/add',
          name: 'inquiryAdd',
          component: inquiryAdd
      },
      {
          path: '/patient/inquiry/edit',
          name: 'inquiryEdit',
          component: inquiryEdit
      },
      {
          path: '/patient/medicine/add',
          name: 'medicineAdd',
          component: medicineAdd
      },
      {
          path: '/patient/medicine/edit',
          name: 'medicineEdit',
          component: medicineEdit
      },
      {
        path: '/activityList',
        name: 'activityList',
        component: activityList
     },
     {
        path: '/activityEdit',
        name: 'activityEdit',
        component: activityEdit
     },
     {
        path: '/adviceList',
        name: 'adviceList',
        component: adviceList
     },
     {
        path: '/bannerList',
        name: 'bannerList',
        component: bannerList
     },
     {
        path: '/checkDetail',
        name: 'checkDetail',
        component: checkDetail
     },
     {
        path: '/adviceDetail',
        name: 'adviceDetail',
        component: adviceDetail
     },
     
  ]
})
